package com.it.travel01.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.it.travel01.pojo.Favorite;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface FavoriteDao extends BaseMapper<Favorite> {

    /**
     *
     * @param uid 用户id
     * @param rid 查询详情路线id
     * @return
     */
//    Favorite isFavoriteByRid(@Param("uid") int uid, @Param("rid") Integer rid);

    /**
     * 给路线表和用户表的中间表添加对应的数据
     * @param rid 路线id
     * @param uid 用户id
     * @return
     */
//    Integer addFavorite(@Param("rid") Integer rid,@Param("uid") Integer uid);


    /**
     * 我的收藏展示
     * @param uid
     * @return
     */
    List<Favorite> findFavoriteByPage(@Param("uid") Integer uid);
}
